$bg: #fff;
$bordr: #eee;

.navbar {
    position: fixed;
    z-index: 2;
    top: 0;
    left: 0;
    width: 100%;
    background-color: $bg;
    flex-direction: column;
    border: 0 !important;
    box-shadow: 0 0 8px rgba(209, 205, 199, .5);
}

.navbar-right .dropdown-content {
    margin-left: -175px;
}

.navbar,
.navbar-header,
.navbar-nav,
.local-search-result,
.nav-container {
    display: flex;
}

.navbar-nav {
    align-items: center;
}

.navbar-brand,
.dropdown-toggle,
.archives > a {
    display: block;
    color: #777;
    padding: 15px;
}

.archives > a > svg {
    display: block;
}

.nav-container {
    justify-content: space-between;
    flex-direction: row;
    width: 100%;
    padding: 0 5%;
    height: 52px;
}

.navbar-left,
.navbar-right {
    flex-grow: 0;
}

.dropdown-toggle {
    height: 52px;
    svg {
        height: 22px;
        width: 22px;
    }
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 0px);
    max-height: calc(100vh - 50px);
    overflow-y: auto;
    display: block;
    visibility: hidden;
    width: 220px;
    margin: 0;
    padding: 0;
    background-color: $bg;
    box-shadow: 0 0 8px rgba(209, 205, 199, .5);
    clip-path: polygon(-100% .5px, 200% .5px, 200% 200%, -100% 200%);
    border-bottom: 1px solid $bordr;
    a {
        display: block;
        width: 100%;
        height: 100%;
        padding: 18px 25px;
    }
    a:hover {
        background: #2570a1;
        color: #e7e7e7;
    }
}

@media screen and (max-width:782px) {
    .navbar-left {
        order: 0;
        flex-grow: 2;
        justify-content: space-around;
        float: left;
    }
    .navbar-right {
        order: 2;
        flex-grow: 1;
        justify-content: space-around;
        float: right;
        .dropdown-content {
            margin-left: 0;
        }
    }
    .navbar-header {
        order: 1;
    }
    .nav-container {
        padding: 0;
        display: flex;
        justify-content: space-around;
    }
    .navbar-nav .open .dropdown-menu > a {
        line-height: 40px;
    }
    .dropdown-content {
        position: absolute;
        top: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        max-height: 100vh;
        height: 100vh;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .archives {
        display: none;
    }
}

@media (min-width: 768px) {
    .navbar-right {
        margin-right: 0;
    }
}
